<template>
    <div>
        <vue2-org-tree
            name="test"
            :data="data"
            :props="{label: 'label', children: 'children', expand: 'expand'}"
            :horizontal="horizontal"
            :collapsable="collapsable"
           
            @on-expand="onExpand"
            @on-node-click="onNodeClick"
          />
    </div>
</template>
<script>
import Vue2OrgTree from '@/components/org-tree'
import data from './data'
export default {
    components: {
        Vue2OrgTree
    },
     data () {
        return {
           
            data: data,
            horizontal: false,
            collapsable: true,
           
        }
    },
     methods: {
       
        onExpand(e, data) {
            
        },
        //点击选项执行的方法，可以用于跳转到其他链接，注意一定要写协议头
        onNodeClick(e, data) {
            console.log(data);
          
        },

    }
}
</script>
<style scoped>

</style>